feat(profiling): Support sample v2 profiles for Android - #118849
Merged
markushi merged 16 commits intoJul 13, 2026
Conversation
Deobfuscation previously handled only the legacy android trace (methods) format. Route it through is_android_trace_format / is_jvm_frame so sample v2 JVM frames are deobfuscated too: merge the results onto the matching frames and rebuild the stacks, expanding inlines. Native frames are left untouched. Also remove get_data_category, dead code since #81481.
markushi
force-pushed
the
markushi/profiling-sample-v2-jvm-deobfuscation
branch
from
July 2, 2026 10:51
c6e4e4c to
e7e4a70
Compare
…ring Rename the profile format version identifier from "2-android-trace" to "2.android-trace" to match the agreed-upon naming. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
vroomrs 0.1.21 accepts a version argument in profile_chunk_from_json_str, letting it deserialize directly to the right chunk format instead of inferring it. Keep passing platform as a fallback for legacy android trace chunks that don't carry a version yet. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
markushi
commented
Jul 3, 2026
Android trace profiles can arrive with a missing or wrongly set version (e.g. a sample "2"), so the version alone can't be trusted to identify the format. Make is_android_trace_format probe the profile structure: only the android trace format stores its frames in "methods". Consult is_android_trace_format before any sample v1/v2 version checks (profile type, duration calculation, normalization) so mislabeled trace profiles are routed correctly, and pass the normalized version to vroomrs chunk deserialization instead of the payload value. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
markushi
commented
Jul 3, 2026
markushi
commented
Jul 3, 2026
markushi
marked this pull request as ready for review
July 3, 2026 13:25
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7aca00c. Configure here.
markushi
marked this pull request as draft
July 3, 2026 13:33
…sample-v2-jvm-deobfuscation
Upgrade vroomrs from 0.1.21 to the newly published 0.1.22 release, which carries the version-based chunk deserialization API used by sample v2 JVM deobfuscation. This replaces the local development build that was previously installed in the environment. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
markushi
marked this pull request as ready for review
July 9, 2026 11:44
Zylphrex
reviewed
Jul 9, 2026
…chunk" is_android_trace_format() matches legacy android transaction profiles too, so they were tagged as android_chunk. Restore the profiler_id distinction: only continuous-profiling chunks carry a profiler_id.
Restore the single-condition form and only skip genuine sample v2 profiles on android, since the version field can be faulty on legacy android trace profiles that do carry device classification.
Zylphrex
approved these changes
Jul 9, 2026
3 tasks
0xadam-brown
added a commit
to getsentry/sentry-java
that referenced
this pull request
Jul 24, 2026
Commit updates the platform used with ANR profiles from Java to Android so that we can properly bill ANR profiling under UI Profile Hours rather than Continuous Profile Hours. Depends on the updates made in [Relay #6183](getsentry/relay#6183), [getsentry #118849](getsentry/sentry#118849), [vroomrs #93](getsentry/vroomrs#93), and [vroom #672](getsentry/vroom#672).
Merged
12 tasks
0xadam-brown
added a commit
to getsentry/sentry-java
that referenced
this pull request
Jul 28, 2026
Commit updates the platform used with ANR profiles from Java to Android so that we can properly bill ANR profiling under UI Profile Hours rather than Continuous Profile Hours. Depends on the updates made in [Relay #6183](getsentry/relay#6183), [getsentry #118849](getsentry/sentry#118849), [vroomrs #93](getsentry/vroomrs#93), and [vroom #672](getsentry/vroom#672). # Conflicts: # CHANGELOG.md
0xadam-brown
added a commit
to getsentry/sentry-java
that referenced
this pull request
Jul 28, 2026
Commit updates the platform used with ANR profiles from Java to Android so that we can properly bill ANR profiling under UI Profile Hours rather than Continuous Profile Hours. Depends on the updates made in [Relay #6183](getsentry/relay#6183), [getsentry #118849](getsentry/sentry#118849), [vroomrs #93](getsentry/vroomrs#93), and [vroom #672](getsentry/vroom#672). # Conflicts: # CHANGELOG.md
0xadam-brown
added a commit
to getsentry/sentry-java
that referenced
this pull request
Jul 29, 2026
#5836) Commit updates the platform used with ANR profiles from Java to Android so that we can properly bill ANR profiling under UI Profile Hours rather than Continuous Profile Hours. Depends on the updates made in [Relay #6183](getsentry/relay#6183), [getsentry #118849](getsentry/sentry#118849), [vroomrs #93](getsentry/vroomrs#93), and [vroom #672](getsentry/vroom#672). Co-authored-by: Markus Hintersteiner <markus.hintersteiner@sentry.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The Android SDK can now emit sample v2 profiles in addition to the legacy android trace format. This wires the profiling pipeline to be able to process both.
The whole pipeline previously always assumed that
platform="android"provided a profile in the Android trace format - regardless ifversion="2"was set or not.platform: "java"profiles (aka profiles from backend services) are intentionally not deobfuscated for now, but support could be easily added.Also removes
get_data_category, dead code since #81481.Note
vroomandvroomrsneed to be updated as well to support the sample v2 Android format.See getsentry/vroom#672 (was automatically deployed earlier this week)
and getsentry/vroomrs#93 (landed in
0.1.22, which is bumped in this PR as well)Testing
process_profile_taskrun.